home *** CD-ROM | disk | FTP | other *** search
/ Megahits 5 / Megahits 5 (1994)(GTI - Rhein-Main-Soft)(DE)(Disc 2 of 2)[!].iso / archive / conv / make3d.lha / Make3Dpic.ifx < prev    next >
Text File  |  1994-07-23  |  2KB  |  127 lines

  1. /*
  2.  * Make3Dpic v1.3
  3.  * Arexx Macro for use with ImageFX
  4.  *
  5.  * Makes a 3D picture for use with Red & Blue glasses.
  6.  * Must be rendered in Imagine with Stereo3D turned on.
  7.  * (or in any program that generates pictures in X-Specs Format)
  8.  *
  9.  *
  10.  * Written By Torgeir Holm ©1994
  11.  *
  12.  * For comments and feedback: torgeir.holm@tbc.powertech.no
  13.  *
  14.  */
  15.  
  16. OPTIONS RESULTS
  17.  
  18. DrawMode Normal
  19. Blend 100
  20. EdgeMode Normal 0
  21. FillMode Solid 0 0 0 SMOOTH
  22.  
  23. SaveUndo ; Undo Off ; Redraw off
  24.  
  25. GetMain
  26. PARSE VAR result name width height depth
  27.  
  28. /* Ask for Image Type */
  29.  
  30. Gadget.1 = 'Choose type of image:'
  31. Gadget.2 = 'Monochrome'
  32. Gadget.3 = 'Color'
  33.  
  34. ListRequest 3 Gadget
  35. IF rc ~= 0 THEN EXIT 0
  36. type = result
  37.  
  38. /* Convert image */
  39.  
  40. /* Separate the Left and Right Image.*/
  41.  
  42. w = width
  43. h = (height/2)
  44. a = (height/2+1)
  45. Crop 0 0 w h TOSWAP
  46. Crop 0 a w h
  47.  
  48. /* Monochrome process */
  49.  
  50. IF type == 2 THEN DO
  51.  
  52.   /* Make Red & Cyan buffers*/
  53.  
  54.   Buffer2Alpha
  55.   ClearBuffer 0 0 0 FORCE
  56.   ActiveColor 4
  57.   MenuPalette
  58.   SetPalette '-1' 0 255 255
  59.   MenuToolbox
  60.   AlphaChannel Frisket
  61.   FloodFill 1 1 255
  62.   Brightness '64'
  63.  
  64.   Swap
  65.  
  66.   Buffer2Alpha
  67.   ClearBuffer 0 0 0 FORCE
  68.   ActiveColor 5
  69.   MenuPalette
  70.   SetPalette '-1' 255 0 0
  71.   MenuToolbox
  72.   FloodFill 1 1 255
  73.   Brightness '64'
  74.  
  75.  
  76.   /* Combine the Images to make 3D image */
  77.  
  78.   Add
  79.  
  80.   /* Delete unwanted stuff */
  81.  
  82.   AlphaChannel Off
  83.   KillAlpha
  84.   KillSwap
  85.  
  86. END
  87.  
  88. /* Color process */
  89.  
  90. IF type == 3 THEN DO
  91.  
  92.   /* Make Red & Cyan buffers*/
  93.  
  94.   Negative
  95.   ActiveColor 5
  96.   MenuPalette
  97.   SetPalette '-1' 255 0 0
  98.   MenuToolbox
  99.   Drawmode Add
  100.   FloodFill 1 1 255
  101.   Negative
  102.  
  103.   Swap
  104.  
  105.   Negative
  106.   ActiveColor 4
  107.   MenuPalette
  108.   SetPalette '-1' 0 255 255
  109.   MenuToolbox
  110.   FloodFill 1 1 255
  111.   Negative
  112.  
  113.   /* Combine the Images to make 3D image */
  114.  
  115.   Add
  116.  
  117.   /* Delete unwanted stuff */
  118.  
  119.   KillSwap
  120.  
  121. End
  122.  
  123. Undo On ; Redraw On
  124. Drawmode Normal
  125.  
  126. EXIT
  127.